package com.yjd.comm.wal.service;

import java.util.Map;

import com.yjd.comm.base.service.IBaseService;
import com.yjd.comm.wal.model.WalProjectModel;

/**
 * <b>description</b>：小钱包产品表业务接口<br>
 * <b>time</b>：2015-08-19 10:54:55 <br>
 * <b>author</b>：  nmd
 */
public interface IWalProjectService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public WalProjectModel insert(WalProjectModel model) throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(WalProjectModel model) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int delete(Long id) throws Exception;
	
	/**
	 * 累计加入金额
	 * @param param
	 * @return
	 * @throws Exception
	 * Double
	 * @exception
	 * @since  1.0.0
	 */
	public Double getProjectSumPrice(Map param)throws Exception;
	
	/**
	 * 查询最新的项目,当没有项目时返回null
	 * @param param
	 * @return WalProjectModel
	 * @throws Exception
	 * @exception
	 * @since  1.0.0
	 */
	public WalProjectModel getLatestProject()throws Exception;
	
	
	/**
	 * 查询第一个小钱包产品
	* @return
	* @throws Exception
	* WalProjectModel
	 */
	public WalProjectModel getFirstModel()throws Exception;

}
